﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace nanoCMS.Core {
	public class Settings {
		public static string ModuleName = "Core";

        #region User
        public static string AvatarWidth {
			get { return Convert.ToString(ConfigurationManager.AppSettings.Get("AvatarWidth")); }
		}
        public static string AvatarHeight
        {
            get { return Convert.ToString(ConfigurationManager.AppSettings.Get("AvatarHeight")); }
        }
        public static string AvatarUploadPath
        {
            get { return Convert.ToString(ConfigurationManager.AppSettings.Get("AvatarUploadPath")); }
        }
        #endregion

		#region Membership
		public static bool IsUserRegistrationOpen {
			get { return Convert.ToBoolean(ConfigurationManager.AppSettings.Get("RegistrationsOpen")); }
			set { ConfigurationManager.AppSettings.Set("RegistrationsOpen", value.ToString()); }
		}

		public static bool RequireMailAuthorisation {
			get { return Convert.ToBoolean(ConfigurationManager.AppSettings.Get("MailAuthorisation")); }
			set { ConfigurationManager.AppSettings.Set("MailAuthorisation", value.ToString()); }
		}

		public static bool  RequireAdminAuthorisation {
			get { return Convert.ToBoolean(ConfigurationManager.AppSettings.Get("RequireAdminAuthorisation")); }
			set { ConfigurationManager.AppSettings.Set("RequireAdminAuthorisation", value.ToString()); }
		}
		#endregion
	}
}
